package DataObjects;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Time;

/*
 * Object containing fields for orders filtering and search
 * @author Alex
 * @since 20/1/2013
 * 
 * 
 */
public class OrderSearch implements Serializable{
	public int limit;
	public String itemName;
	public String supplierName;
	public Date dateStart;
	public Date dateEnd;
	public Time timeStart;
	public Time timeEnd;
	
	public OrderSearch(){
		this.limit = -1;
		this.itemName = null;
		this.supplierName = null;
		this.dateEnd = Date.valueOf("1970-1-1");
		this.dateStart = Date.valueOf("1970-1-1");
		this.timeEnd = Time.valueOf("00:00:00");
		this.timeStart = Time.valueOf("00:00:00");
	}
	
	public String toString(){
		String str = "";
		str += "\nLimit: " + this.limit;
		str += "\nitemName: " + this.itemName;
		str += "\nsuppName: " + this.supplierName;
		str += "\ndate: " + this.dateStart;
		str += "\ntime: " + this.timeStart;
		
		return str;
	}
	
}
